From 80e180d5b350a14946d77b09019f08dfe574e619 Mon Sep 17 00:00:00 2001 From: "acnt2@huggins.lce.cl.cam.ac.uk" Date: Thu, 5 Oct 2006 17:29:19 +0100 Subject: [PATCH] [XEND] Clean up some keyword clashes with XendCheckpoint - Replaced str with domstr - Disabled changing domain name while migrating Signed-off-by: Alastair Tse --- tools/python/xen/xend/XendCheckpoint.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index 30a9caaf74..6d36d0f1b4 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -40,13 +40,13 @@ def write_exact(fd, buf, errmsg): def read_exact(fd, size, errmsg): buf = '' while size != 0: - str = os.read(fd, size) - if not len(str): + readstr = os.read(fd, size) + if not len(readstr): log.error("read_exact: EOF trying to read %d (buf='%s')" % \ (size, buf)) raise XendError(errmsg) - size = size - len(str) - buf = buf + str + size = size - len(readstr) + buf = buf + readstr return buf @@ -60,7 +60,9 @@ def save(fd, dominfo, network, live, dst): # Rename the domain temporarily, so that we don't get a name clash if this # domain is migrating (live or non-live) to the local host. Doing such a # thing is useful for debugging. - dominfo.setName('migrating-' + domain_name) + # + # FIXME: I don't think this is such a good idea - atse@xensource.com + #dominfo.setName('migrating-' + domain_name) try: dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP1, domain_name) @@ -101,10 +103,10 @@ def save(fd, dominfo, network, live, dst): except Exception, exn: log.exception("Save failed on domain %s (%d).", domain_name, dominfo.getDomid()) - try: - dominfo.setName(domain_name) - except: - log.exception("Failed to reset the migrating domain's name") + #try: + # dominfo.setName(domain_name) + #except: + # log.exception("Failed to reset the migrating domain's name") raise Exception, exn -- 2.30.2